<link rel="import" href="./polymer/polymer.html">
<link rel="import" href="./sign-here.html">

<dom-module id="x-sign-here">
  <template>
    <style>
      sign-here, img {
        border: 1px solid #ccc;
        width: 400px;
        height: 200px;
      }
      pre {
        white-space: pre-wrap;
        word-wrap: break-word;
      }
    </style>
    <sign-here id="signhere" width="400" height="200" image="{{image}}" active="{{active}}" empty="{{empty}}" type="[[type]]" pen-color="[[color]]" background-color="#fffff7"></sign-here>
    <ul>
      <li>Active: [[active]]</li>
      <li>Empty: [[empty]]</li>
    </ul>
	<p class="ws-module-part abs-title">
							<span class="abs-index">、</span>
							
						</p>
						<p class="ws-module-part">四、以下的签名表示：</p>
	<!-- 深静脉透析导管拔管术情同意书s-->
				<div class="module-ws" id="printWsModule2" style="display:none;">
					<table class="ws-table-wrap">
						<tbody style="display:table-header-group;">
							<tr>
								<td colspan="5">
									<h2 class="ws-module-title wsgl-item-title-name">深静脉透析导管拔管术知情同意书</h2>
								</td>
							</tr>
							<tr>
								<td>患者姓名：<span class="ws-hzname"></span></td>
								<td align="center">性别：<span class="ws-hzsex"></span>&nbsp;&nbsp;	</td>
								<td align="center">年龄：<span class="ws-hzage"></span>&nbsp;&nbsp;	</td>
								<td align="center">透析号：<span class="ws-txnum"></span></td>
								<td align="right">住院(门诊)号：<span class="ws-txzymzh"></span></td>
							</tr>
							<tr>
								<td colspan="5" style="border-bottom: 1px solid #000;">
									<span class="ws-hzzd"></span>
								</td>
							</tr>
						</tbody>
					</table>
					<div>
						<!-- ↓-->
				
				<!-- ↑-->
						<p class="ws-module-part abs-title">
							<span class="abs-index">一、</span>
						
						</p>

						<p class="ws-module-part"></p>
						<p class="ws-module-content">
							<span class="ws-content-dic">1.</span>。
						</p>
						
						<p class="ws-module-part">四、以下的签名表示：</p>
						<p class="ws-module-content">
							<span class="ws-content-dic">1.</span>您已阅读并理解有关深静脉透析导管拔管术的相关信息。
						</p>
						<p class="ws-module-content">
							<span class="ws-content-dic">2.</span>医生对以上问题已经向您作了充分的解释。
						</p>
						<p class="ws-module-content">
							<span class="ws-content-dic">3.</span>您授权并同意医生为患者施行深静脉透析导管拔管术。
						</p>
						<p class="ws-module-content">
							<span class="ws-content-dic">4.</span>您同意学习者在操作过程中进行观摩，拍摄不注明患者身份的影像，用于医疗、教学和科研。 及时就诊。
						</p>
						<p class="ws-module-content">
							<span class="ws-content-dic">5.</span>您同意留取血标本，用于科学研究。 及时就诊。
						</p>

						<p class="ws-module-signature" style="margin-top:0px;">
							<span class="ws-signature-name">患者签名：
								<u class="ws-sign-area"></u>
							</span>
							<span class="ws-signature-date">日期：&nbsp;&nbsp;
								<span class="sign-date-item">年</span>
								<span class="sign-date-item">月</span>
								<span class="sign-date-item">日</span>
							</span>
						</p>
						<p class="ws-module-signature">
							<span class="ws-signature-name">医生签名：
								<u class="ws-sign-area"></u>
							</span>
							<span class="ws-signature-date">日期：&nbsp;&nbsp;
								<span class="sign-date-item">年</span>
								<span class="sign-date-item">月</span>
								<span class="sign-date-item">日</span>
							</span>
						</p>
					</div>
				</div>
				<!-- 2深静脉透析导管拔管术情同意书e-->
    <button on-tap="clear">Clear</button>
    <button on-tap="jpeg">Jpeg</button>
    <button on-tap="png">Png</button>
    <button on-tap="webp">Webp</button>
    <button on-tap="red" style="color: #a33">Red</button>
    <button on-tap="green" style="color: #3a3">Green</button>
    <button on-tap="blue" style="color: #33a">Blue</button>
    <h3>Captured Image</h3>
    <img src$="[[image]]">
    <h3>Image Data</h3>
    <p>[[len(image)]] bytes</p>
    <pre>[[image]]</pre>
  </template>
  <script>
    Polymer({
      is: "x-sign-here",

      properties: {
        image: String,
        type: {
          type: String,
          value: 'image/png'
        },
        color: {
          type: String,
          value: '#33a'
        }
      },
      clear: function() {
        this.$.signhere.clear();
      },
      jpeg: function() {
        this.type = 'image/jpeg';
      },
      png: function() {
        this.type = 'image/png';
      },
      webp: function() {
        this.type = 'image/webp';
      },
      red: function() {
        this.color = '#a33';
      },
      green: function() {
        this.color = '#3a3';
      },
      blue: function() {
        this.color = '#33a';
      },
      len: function(image) {
        return image.length;
      }
    });
  </script>
</dom-module>
